package com.base.springboot.starter.common.autoconfigure;

import com.base.springboot.starter.common.cipher.impl.AesBcCryptedMachine;
import com.base.springboot.starter.common.http.CsHttpClientRepo;
import com.base.springboot.starter.common.dns.DNSFresher;
import com.base.springboot.starter.common.http.PoolingHttpClientConnectionManagerMonitor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 自动配置类
 *
 * @author admin
 * @date 2020/8/17 下午3:48
 */
@Slf4j
@Configuration
public class CommonAutoConfiguration {
    public CommonAutoConfiguration() {
        log.info("Starter CommonAutoConfiguration Auto Init ...");
    }

    @Bean
    public DNSFresher dNSFresher(){
        return new DNSFresher();
    }

    @Bean
    public AesBcCryptedMachine aesBcCryptedMachine(){
        return new AesBcCryptedMachine();
    }

    @Bean
    public PoolingHttpClientConnectionManagerMonitor poolingHttpClientConnectionManagerMonitor(){
        return new PoolingHttpClientConnectionManagerMonitor();
    }

    @Bean
    public CsHttpClientRepo csHttpClientRepo(){
        return new CsHttpClientRepo();
    }

}